<template>
  <div>
    <el-tabs v-model="tabCurrent" type="card">
      <el-tab-pane label="发放统计" name="first">
        <first />
      </el-tab-pane>

      <el-tab-pane label="发放记录" name="second">
        <second :parentData="data" />
      </el-tab-pane>

      <el-tab-pane label="红包模板" name="third">
        <third />
      </el-tab-pane>

      <el-tab-pane label="可用员工" name="fourth">
        <fourth @dataToSon = "dataToSon" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import first from "@/views/masket/red_envelope/first";

import second from "@/views/masket/red_envelope/second";

import third from "@/views/masket/red_envelope/third";

import fourth from "@/views/masket/red_envelope/fourth"
export default {

  components: {
    first,
    second,
    third,
    fourth
  },
  data() {
    return {
      tabCurrent: 'first',
        data: {},
    };
  },
  methods: {
      dataToSon(data) {
          this.data = data
          this.tabCurrent = 'second'
      },
  }
}
</script>

<style scoped>

</style>
